﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using TKA.Helper;

namespace TKA.Model
{
    public class TrackVideo
    {
        public TrackVideo()
        {
            WestThroat = new Camera();
            EastThroat = new Camera();
            Track = new List<TwoCamera>();
        }

        public TwoCamera TakeCameraConfigByTrackNum(int tracknum)
        {
            if (tracknum == 15) {
                return Track[tracknum - 15];
            }
            else if(tracknum == 14){
                return Track[tracknum - 13];
            }
            else if (tracknum == 13)
            {
                return Track[tracknum - 11];
            }
            else if (tracknum == 9)
            {
                return Track[tracknum - 6];
            }
            else if (tracknum == 8)
            {
                return Track[tracknum - 4];
            }
            else if (tracknum == 7)
            {
                return Track[tracknum - 2];
            }
            else if (tracknum == 6)
            {
                return Track[tracknum];
            }
            else if (tracknum == 5)
            {
                return Track[tracknum + 2];
            }
            else if (tracknum == 4)
            {
                return Track[tracknum + 4];
            }
            else if (tracknum == 3)
            {
                return Track[tracknum + 6];
            }
            else if (tracknum == 2)
            {
                return Track[tracknum + 8];
            }
            else
            {
                return Track[tracknum - 15];
            }
           
        }
        public Camera WestThroat { get; set; }
        public Camera EastThroat { get; set; }
        public List<TwoCamera> Track { get; set; }
    }

    public class TwoCamera
    {
        public TwoCamera()
        {
            West = new Camera();
            East = new Camera();
        }

        public Camera West { get; set; }
        public Camera East { get; set; }
    }
}
